package com.muyu.common.core.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 基础类
 * @author Administrator
 */
@Getter
@Setter
public abstract class BaseEntity implements Serializable {
    @TableField(
            fill = FieldFill.INSERT,
            value = "create_by"
    )
    private String createBy;
    @TableField(
            fill = FieldFill.INSERT,
            value = "create_time"
    )
    private LocalDateTime createTime;

    @TableField(
            fill = FieldFill.INSERT_UPDATE,
            value = "update_by"
    )
    private String updateBy;
    @TableField(
            fill = FieldFill.INSERT_UPDATE,
            value = "update_time"
    )
    private LocalDateTime updateTime;

    /**
     * 删除状态  1删除 0未删除
     */
    @TableLogic
    @TableField("delete_flag")
    private Integer deleteFlag;
}